{include file="public/header" /}

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>发票记录</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    <form method="get" name="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>用户名：</dt>
                <dd><input type="text" value="{$Request.get.title}" name="title" id="title" class="txt"
                           style="width:100px;"></dd>
            </dl>
            <dl>
                <dt>类型：</dt>
                <dd>
                    <select name="type">
                        <option value="" selected>{$Think.lang.ds_please_choose}</option>
                        <option value="1" <?php if(isset($_GET['type'])&&$_GET['type']==1){?>selected <?php } ?>  >纸质版</option>
                        <option value="2"  <?php if(isset($_GET['type'])&&$_GET['type']==2){?>selected <?php } ?> > 电子版</option>
                    </select>
                </dd>
            </dl>
            <div class="btn_group">
                <a href="javascript:document.formSearch.submit();" class="btn" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
                {if $type != '' || $title != ''}
                <a href="{:url('Invoice/invoicelist')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
                {/if}
            </div>
        </div>
    </form>

    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
            <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
        </div>
        <ul>
            <!--   <li>{$Think.lang.refund_reason_help1}</li>-->
            <li>{$Think.lang.refund_reason_help2}</li>
        </ul>
    </div>


    <table class="ds-default-table">
        <thead>
        <tr class="thead">
            <th>序号</th>
            <th style="width: 100px;">用户名</th>
            <th style="width: 100px;">发票名</th>
            <th class="align-center " style="width: 200px;">类型</th>
            <th class="align-center " style="width: 200px;">开票类型</th>
            <th class="align-center " style="width: 200px;">开票时间</th>
            <th class="align-center " style="width: 200px;">操作人</th>
            <th class="align-center" style="width: 200px;">{$Think.lang.ds_handle}</th>
        </tr>
        </thead>
        <tbody>
        {notempty name="list2"}
        <?php $index = 1;foreach($list2 as $val){ ?>
        <tr class="hover" id="ds_row_{$val.invoice_id}">
            <td class="w48 sort"><?php echo $index ?></td>
            <td>{$val.member_name}</td>
            <td>{$val.name}</td>
            <td class="w48 sort"><?php if($val['type']==1){ echo '纸质版'; }else if($val['type']==2){ echo'电子版'; }else{ echo'全部'; } ?></td>
            <td class="w48 sort"><?php if($val['billing_type']==1){ echo '个人'; }else if($val['billing_type']==2){ echo'企业'; }else{ echo'全部'; } ?></td>
            <td>{$val.invoice_operation_time|date="Y-m-d H:i:s",###}</td>
            <td>{$val.invoice_operation_name}</td>
            <td class="w150 align-center">
                <a href="javascript:dsLayerOpen('{:url('Invoice/list2',['id'=>$val.invoice_id])}','查看-{$val.name}','700px','500px')"
                   class="dsui-btn-view"><i class="iconfont"></i>查看</a>
            </td>
        </tr>
        <?php $index++; } ?>
        {else /}
        <tr class="no_data">
            <td colspan="15">{$Think.lang.ds_no_record}</td>
        </tr>
        {/notempty}
        </tbody>

    </table>
    {$show_page}
</div>